package com.nc.delivery_project.client.add_schedule;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.cellview.client.CellList;
import com.google.gwt.user.client.ui.*;


/**
 * Created by DRAGON on 17.01.2015.
 */
public class AddScheduleView extends Composite {
    interface AddScheduleViewUiBinder extends UiBinder<VerticalPanel, AddScheduleView> {
    }

    private static AddScheduleViewUiBinder ourUiBinder = GWT.create(AddScheduleViewUiBinder.class);

    AddSchedulePresenter presenter;

     @UiField
     ListBox originLstBox;

    @UiField
    ListBox destinationLstBox;

    @UiField
    TextBox primeCostTxtBox;

    @UiField
    TextBox sellingRateTxtBox;

    @UiField
    TextBox departureDateTxtBox;

    @UiField
    TextBox arrivalDateTxtBox;

    @UiField
    TextBox tariffDateTxtBox;

    @UiField
    ListBox transportCompanyLstBox;

    @UiField
    ListBox currencyLstBox;

    @UiField
    Button regBtn;

    public AddScheduleView() {
        initWidget(ourUiBinder.createAndBindUi(this));
    }

    @UiHandler("regBtn")
    void registrationHandler(ClickEvent event) {
        presenter.addSchedule();
    }

    public void setPresenter(AddSchedulePresenter presenter) {
        this.presenter = presenter;
    }

}
